<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            list-style: none;
        }
        #con{
            width: 100px;
            list-style: none;
        }
        #con ul li {
            float: left;
            width: 100px;
            height: 30px;
            line-height: 30px;
            text-align: center;
        }
        #con a{
            text-decoration: none;
            color: #fff;
            display: block;
            width: 100px;
            height: 30px;
            background: #ccc;
        }
        #con a:hover{
            background-color: pink;
        }
        #con ul ul{
            display: none;
        }
    </style>
<body>
    <div id="con">
        <ul>
            <li id="li01">
            <span>微博</span>
            <img src="./向下.png" style="width: 12px;">
            <ul id="ul01">
                <li><a href="javascript:;">评论</a></li>
                <li><a href="javascript:;">私信</a></li>
                <li><a href="javascript:;">@我</a></li>
            </ul>
        </li>
        </ul>
    </div>
    <script>
        function myFn(param1,param2){
            var myli = document.getElementById(param1);
            var myul = document.getElementById(param2);
            myli.onmousemove = function(){
                myul.style.display = 'block';
            }
            myli.onmouseout = function(){
                myul.style.display = 'none';
            }
        }
        myFn('li01','ul01'); //调用函数
    </script>
</html>